/* 全局样式覆盖 */
html, body, #root {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* 自定义全局样式 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }
}

/* 引入 TailwindCSS 基础样式 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局变量 */
:root {
  --background: #ffffff;
  --foreground: #171717;
  --primary-color: #1677ff;
  --primary-hover: #4096ff;
  --primary-light: rgba(22, 119, 255, 0.1);
  --error-color: #ff4d4f;
  --success-color: #52c41a;
  --warning-color: #faad14;
  --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition-normal: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
}

/* 增强表单控件样式 */
.ant-input,
.ant-input-affix-wrapper,
.ant-select-selector,
.ant-picker,
.ant-input-number,
.ant-textarea {
  border-radius: 6px !important;
  transition: var(--transition-normal) !important;
  border-width: 1px !important;
}

.ant-input-affix-wrapper:hover,
.ant-input:hover,
.ant-select-selector:hover,
.ant-picker:hover {
  border-color: var(--primary-hover) !important;
}

.ant-input-affix-wrapper:focus,
.ant-input-affix-wrapper-focused,
.ant-input:focus,
.ant-input-focused,
.ant-select-focused .ant-select-selector {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 2px var(--primary-light) !important;
  outline: none !important;
}

/* 美化按钮样式 */
.ant-btn {
  border-radius: 6px !important;
  transition: var(--transition-normal) !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ant-btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
}

.ant-btn-primary:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(22, 119, 255, 0.2);
}

.ant-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
}

/* 改进表单组件间距 */
.ant-form-item {
  margin-bottom: 20px !important;
}

.ant-form-item:last-child {
  margin-bottom: 0 !important;
}

/* 卡片样式增强 */
.ant-pro-card {
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: var(--card-shadow) !important;
  transition: var(--transition-normal) !important;
}

.ant-pro-card:hover {
  box-shadow: var(--card-hover-shadow) !important;
}

.ant-pro-card-header {
  padding: 16px 24px !important;
}

.ant-pro-card-body {
  padding: 24px !important;
}

/* 登录和注册表单页面背景 */
.login-bg,
.register-bg {
  background: linear-gradient(135deg, rgba(240, 248, 255, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
  background-size: cover;
  background-attachment: fixed;
  position: relative;
}

.login-bg::before,
.register-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 10% 20%, rgba(22, 119, 255, 0.03) 0%, transparent 80%);
  z-index: -1;
}

/* 链接样式优化 */
a {
  color: var(--primary-color);
  transition: var(--transition-fast);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* 美化标题样式 */
h1, h2, h3, h4, h5, h6,
.ant-typography h1,
.ant-typography h2,
.ant-typography h3,
.ant-typography h4,
.ant-typography h5,
.ant-typography h6 {
  font-weight: 600 !important;
  color: #262626 !important;
}

/* 暗黑模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
    --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }
  
  h1, h2, h3, h4, h5, h6,
  .ant-typography h1,
  .ant-typography h2,
  .ant-typography h3,
  .ant-typography h4,
  .ant-typography h5,
  .ant-typography h6 {
    color: #fafafa !important;
  }
  
  .login-bg,
  .register-bg {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.9) 0%, rgba(30, 30, 30, 0.95) 100%);
  }
  
  .login-bg::before,
  .register-bg::before {
    background: radial-gradient(circle at 10% 20%, rgba(22, 119, 255, 0.05) 0%, transparent 80%);
  }
} 